<template>
	<view class="list-container">
		<view class="search">
			<!-- <view class="s-type">
				<dean-popover direction="right" modalLeftPos="6rpx" @select="selectType" :btnList="typeList" chooseText="优先级" isShowIcon></dean-popover>
			</view> -->
			<!-- <my-popover ref="myPopover" :active="active" direction="right" modalLeftPos="6rpx" @select="selectType"
				:btnList="typeList" chooseText="筛选"></my-popover> -->
			<!-- <view class="s-arrow"></view> -->
			<view class="search-box">
				<view class="icon">
					<image src="../../static/icon/search.png"></image>
				</view>
				<input @confirm="searchResident" v-model="searchText" type="text" class="search-input"
					confirm-type="search" placeholder="请输入小区名称筛选">
			</view>
			<my-popover ref="myPopover" :active="active"  modalLeftPos="-90rpx" @select="selectType"
				:btnList="statusList" chooseText="状态"></my-popover>
				<view class="s-arrow"></view>
			
		</view>
		<view v-for="item in villageInfo['考核小区']" :key="item.id">
			<van-cell :value="`已检查${item['考核次数']}`" :label="`当前平均分:${item['月平均得分']}`" center :title="item['项目名称']"  size="large" link-type="navigateTo"
			:url="`/assessSystem/assessDesc/assessDesc?id=${villageInfo.id}&projId=${item.id}&projName=${item['项目名称']}`" is-link />
		</view>
		
		<!-- <van-cell title="单元格" is-link value="内容" />
		<van-cell title="单元格" is-link value="内容" />
		<van-cell title="单元格" is-link value="内容" />
		<van-cell title="单元格" is-link value="内容" /> -->
	</view>
</template>

<script>
	import MyPopover from '@/myComponents/my-popover/dean-popover.vue'
	export default {
		components: {
			MyPopover
		},
		data() {
			return {
				villageInfo: {},
				params: {
					社区id: this.$config.groupId,
					pagination: {
						current: 1,
						pageSize: 10
					},
					sorter: {
						field: "id",
						order: 0
					}
				},
				projectList: [],
				url:'/assessSystem/index/index?id=1',
				searchText: '',
				typeList: ['全部', '流动人口', '常住人口', ],
				statusList: ['全部', '未完成','已完成']
			}
		},
		onLoad(options) {
			this.villageInfo = JSON.parse(options.item)
			// this.projectList = uni.getStorageSync('projectList')
			// this.getProjectList()
		},
		methods: {
			getProjectList() {
				this.$http2.post('/transactionCompete/projiteminfo', this.params).then(res => {
					if(res.code === 10000) {
						// console.log(res)
						this.projectList = res.data.list
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	.van-cell__value {
		font-size: 28rpx!important;
	}
	.list-container {
		background-color: #f5f5f5;
	}
	.search {
		// margin-left: 100rpx;
		width: 750rpx;
		height: 96rpx;
		background-color: #fff;
		display: flex;
		align-items: center;
		padding-left: 20rpx;
		margin-bottom: 20rpx;

		.s-arrow {
			width: 16rpx;
			height: 16rpx;
			border-top: 2rpx solid #3080FB;
			border-right: 2rpx solid #3080FB;
			transform: rotate(135deg);
			margin-left: 10rpx;
			margin-top: -4rpx;
		}

		.search-box {
			width: 560rpx;
			height: 56rpx;
			margin: 0 30rpx;
			padding-left: 17rpx;
			padding-right: 20rpx;
			// background-color: pink;
			border: 2rpx solid #595959;
			border-radius: 28rpx;
			display: flex;

			.icon {
				width: 50rpx;
				height: 46rpx;
				margin-top: 3rpx;

				image {
					width: 100%;
					height: 100%;
				}
			}

			.search-input {
				width: 450rpx;
				height: 100%;
				color: #999;
			}

			.pop {
				position: absolute;
				right: 60rpx;
			}
		}

		.add {
			font-size: 32rpx;
			font-weight: bold;
			color: #5094FF;
			margin-right: 4rpx;
		}
	}
</style>
